<?php

namespace App\Console\Commands;

use App\Models\Device\Device;
use Illuminate\Console\Command;

class CheckStatus extends Command
{

    protected $signature = 'checkstatus';

    public function handle()
    {

        Device::where('status',1)->whereDate('next_repair_at','<',date('Y-m-d'))->update(['status'=>2]);
        return 0;
    }
}
